<?php
/**
 * 管理员模块控制器
 * @Author    紫梦
 * @DateTime  2017-11-19
 * @copyright 响响租车
 * @version   1.0
 */
namespace app\index\controller;
use think\Controller;
use think\Request;
use app\common\utils\OssFlies;
use app\common\enums\ResultEnum;
use app\common\utils\ResultVOUtil;

class File extends Controller
{
	public function upload(){
		$request = Request::instance();
		$file = $request->file('file');
		$oss = new OssFlies();
		$url = $oss->uploadOss($file,'test');
		return ResultVOUtil::success($url);
	}

	public function del(){
		$request = Request::instance();
	}

	public function test(){
		return ResultVOUtil::error(ResultEnum::DEL_ERROR);
	}
}
